﻿@model WaiGaoQiaoWeb.Models.PasswordModifyVM
@{
    ViewBag.Title = "PasswordModifyIndex";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section Head
{
    @Html.Css("EditForm")
    <script type="text/javascript" language="javascript">
        $(document).ready(function () {
            $("form").makeValidationInline();
            $("#btnSave").click(function (event) {
                if (!$("#fmEdit").valid()) {
                    return false;
                }
                $('#fmEdit').ajaxSubmit(function (callback) {
                    if (callback == 1) {
                        showLoadingMsg("保存成功!", { left: 400, top: 6 }, true, 3000);
                    }
                    else {
                        showLoadingMsg("保存失败!", { left: 400, top: 6 }, true, 3000);
                    }
                });
            });
        });
    </script>
}
@using (Html.BeginForm("SavePassword", "PasswordModify", FormMethod.Post, new { id = "fmEdit" }))
{
    @Html.ValidationSummary(true)
@*@Html.HiddenFor(model => model.userid)
    @Html.HiddenFor(model => model.PasswordsEdit)*@
    <div id="editFormWrapper">
        <br />
        <div class="editFormItems">
            <div class="editFormLabel">
                旧密码：
            </div>
            <div class="editForm">
                @Html.PasswordFor(model => model.PassWordsOld)<span style="color: Red;">*</span>
                @Html.ValidationMessageFor(model => model.PassWordsOld)
            </div>
        </div>
        <div class="editFormItems">
            <div class="editFormLabel">
                新密码：
            </div>
            <div class="editForm">
                @Html.PasswordFor(model => model.passwords)<span style="color: Red;">*</span>
                @Html.ValidationMessageFor(model => model.passwords)
            </div>
        </div>
        <div class="editFormItems">
            <div class="editFormLabel">
                确认新密码：
            </div>
            <div class="editForm">
                @Html.PasswordFor(model => model.passwordsEnter)<span style="color: Red;">*</span>
                @Html.ValidationMessageFor(model => model.passwordsEnter)
            </div>
        </div>
        <div class="editFormItems">            <a id="btnSave" href="javascript:void(0);" class="button">保存</a>        </div>
    </div>
}
